package com.dailyblue.java.spring.cloud.example.producer.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/producer")
@RestController
public class ProducerController {
    @Value("${server.port}")
    private Integer port;

    @RequestMapping("/a")
    public String a() {
        return "This is ProducerController`a method! port :" + port;
    }

    @GetMapping("/b/{a}/{b}")
    public String b(@PathVariable("a") String a, @PathVariable("b") String b) {
        return "This is ProducerController`b method! port :" + port + ",params:" + a + "," + b;
    }
    @PostMapping("/c")
    public String c(){
        return "This is ProducerController`c method! port :" + port;
    }
}
